#
# Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
# All rights reserved.
#
# For the applicable distribution terms see the license.txt -file, included in
# the distribution.
#-----------------------------------------------------------------------------
folder_qml.source = qml/inapppurchase
folder_qml.target = qml
DEPLOYMENTFOLDERS = folder_qml

SOURCES += main.cpp \
    declarativepurchaselistmodel.cpp \
    purchasableitemBase.cpp \
    purchasableitemnonprotected.cpp \
    itemstatusimageprovider.cpp \
    purchasableitem.cpp \
    CAFAPI/drmfile.cpp

# Please do not modify the following two lines. Required for deployment.
include(qmlapplicationviewer/qmlapplicationviewer.pri)
qtcAddDeployment()

OTHER_FILES += \
    MyButton.qml \
    qml/inapppurchase/content/Button.qml \
    qml/inapppurchase/content/PopupDialog.qml

HEADERS += \
    declarativepurchaselistmodel.h \
    purchasableitemBase.h \
    purchasableitemnonprotected.h \
    itemstatusimageprovider.h \
    purchasableitem.h \
    CAFAPI/drmfile.h

DEPENDPATH += CAFAPI

# dependency for Symbian^3 and later devices
supported_platforms = "; Application only supports Symbian^3" \
                      "[0x20022E6D], 0, 0, 0, {\"Symbian^3\"}"

CONFIG += mobility debug
MOBILITY = serviceframework

TEMPLATE = app

symbian: {
    TARGET.UID3 = 0xE001EC5D
    # Smart Installer package's UID
    # This UID is from the protected range and therefore the package will
    # fail to install if self-signed. By default qmake uses the unprotected
    # range value if unprotected UID is defined for the application and
    # 0x2002CCCF value if protected UID is given to the application
    DEPLOYMENT.installer_header = 0x2002CCCF

    # DRM protecction support
    DEPENDPATH += CAFAPI/Symbian
    SOURCES += CAFAPI/Symbian/drmfile_p.cpp
    HEADERS += CAFAPI/Symbian/drmfile_p.h
    LIBS += -lcaf \
        -lcafutils \
        -lapmime \

    # *** including inappbilling below
    LIBS += -liapclientapi
    # NOTE: this is enabling stdlib to prevent error 'undefined symbol __aeabi_atexit'
    LIBS += -lusrt2_2

    # capabilities required for IAP API
    TARGET.CAPABILITY += NetworkServices

    iap_dependency.pkg_prerules = "; Has dependency on IAP component" \
                                  "(0x200345C8), 0, 2, 2, {\"IAP\"}"
    DEPLOYMENT += iap_dependency

    # IAP API files to include in package
    addIapFiles.sources = ./data/IAP_VARIANTID.txt #TODO: <removeme to enable testmode> ./data/TEST_MODE.txt
    addIapFiles.path = ./

    # DRM protected purchasable items
    # change productID path resourceid_* after obtaning real product id
    addDrmFiles01.sources = ./data/drm/item01/test.png
    addDrmFiles01.path = ./drm/data/resourceid_751224/

    addDrmFiles02.sources = ./data/drm/item02/test.png
    addDrmFiles02.path = ./drm/data/resourceid_751226/

    addDrmFiles03.sources = ./data/drm/item03/test.png
    addDrmFiles03.path = ./drm/data/resourceid_751227/

    #non protected purchasable items
    addCatalog.sources = ./data/catalog.dat
    addCatalog.path = ./data
	
	DEPLOYMENT += addIapFiles addDrmFiles01 addDrmFiles02 addDrmFiles03 addCatalog
}

RESOURCES +=

#workaround for http://bugreports.qt.nokia.com/browse/QTCREATORBUG-2158
debug {
MMP_RULES -= PAGED
MMP_RULES *= UNPAGED
}
